package com.nashuju.web.controller.form;

import org.durcframework.core.GridResult;
import org.durcframework.core.MessageResult;
import org.durcframework.core.controller.CrudController;

import com.nashuju.web.entity.form.FormTemplate;
import com.nashuju.web.entity.form.FormTemplateSch;
import com.nashuju.web.service.form.FormTemplateService;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class FormTemplateController extends
		CrudController<FormTemplate, FormTemplateService> {

	@RequestMapping("/addFormTemplate.do")
	public @ResponseBody
	MessageResult addFormTemplate(FormTemplate entity) {
		return this.save(entity);
	}

	@RequestMapping("/listFormTemplate.do")
	public @ResponseBody
	GridResult listFormTemplate(FormTemplateSch searchEntity) {
		return this.query(searchEntity);
	}

	@RequestMapping("/updateFormTemplate.do")
	public @ResponseBody
	MessageResult updateFormTemplate(FormTemplate entity) {
		return this.update(entity);
	}

	@RequestMapping("/delFormTemplate.do")
	public @ResponseBody
	MessageResult delFormTemplate(FormTemplate entity) {
		return this.delete(entity);
	}
	
}